/**
* 将 log 工具作为插件使用
* Author: dong xing
* Date: 2019-01-29
* Time: 16:53
* Email: dong.xing@outlook.com
*/

import Log from '@/utils/log'

let log = {}
export default log.install = function (Vue, option) {
  Object.assign(Vue.prototype, {
    $log: (message) => Log.success('Log', message)
  }, {
    $logger: {
      default: (title, message) => Log.default(title, message),
      primary: (title, message) => Log.primary(title, message),
      success: (title, message) => Log.success(title, message),
      warning: (title, message) => Log.warning(title, message),
      danger: (title, message) => Log.danger(title, message)
    }
  })
}
